
def home():
    string1=input("输入第一个字符串:")
    string2=input("输入第二个字符串:")
    count=0
    stringSet1=set(string1)
    stringSet2=set(string2)
    intersectionSet=set.intersection(stringSet1,stringSet2)
    same_chars=[]
    if(len(intersectionSet)>0):
        for c in intersectionSet:
            same_chars.append(c)
            count+=1
        print(F'相同的字符有{count}个,分别是{same_chars}')
    else:
        print("没有相同字符")

if __name__ == '__main__':
    home()